<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <title></title>
</head>
<body>
    <h1>Dynamic Import</h1>
    <script>
        import('./bar.js').then((mod) => {
                    console.log("bar.js loaded. ", mod)
                    console.log("mod.bar:", mod.bar)
                    setTimeout(() => {
                        console.log("after 2s, mod.bar:", mod.bar)
                    }, 2000);
        })
    </script>
</body>
</html>
